-
Notifications
You must be signed in to change notification settings - Fork 19
Add password for OTA upload to LittleFS #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Password capability added to plug-in. If none required simply leave it empty. Use this plug-in only, if you had enough of flashing stupid temporary sketches without password, just to upload the file system and then flash again the final sketch. The dialog box will show up every time, even there is no password required (sorry, can't be avoided without modifying too much).
If a password is required to upload LittleFS via OTA, it can be entered now. Downside is, that the dialog box shows up every time. Simply leave it empty, if no password is required. In case you don't like this "extra" effort, don't use this plug-in.
For ESP8266 OTA upload of LittleFS
@@ -320,7 +321,17 @@ private void createAndUpload(){ | |||
if(isNetwork){ | |||
System.out.println("[LittleFS] IP : "+serialPort); | |||
System.out.println(); | |||
sysExec(new String[]{pythonCmd, espota.getAbsolutePath(), "-i", serialPort, "-s", "-f", imagePath}); | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think you could actually see if an AUTH is needed before presenting the box? I understand that you're using it, but since ArduinoOTA is so insecure anyway I have a feeling that most people will not be using a password at all.
It's possible to probe the board using UDP comms (connect to ESP8266, send SPIFFS command, check for AUTH response, see espota.py), or even just call espota.py once, and if it fails then prompt for a PWD and try again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice and simple, BTW! Just trying to make the default case the easiest/simplest for end users.
The dialogbox requests a password, even it may not be required. If you know, that OTA is not protected by password, leave the box empty and continue. The upload script is then called as before.
If a password is entered, the script will be executed with the -a option and the password.